package com.shell.guard.security;

import org.springframework.security.authentication.AbstractAuthenticationToken;

public class CustomAuthenticationToken extends AbstractAuthenticationToken {
	private static final long serialVersionUID = -5704647095107379229L;
	private CustomUserDetails userDetails;

	public CustomAuthenticationToken(CustomUserDetails userDetails) {
		super(null);
		this.userDetails = userDetails;
		super.setAuthenticated(true);
	}

	public Object getPrincipal() {
		return this.userDetails;
	}

	public Object getCredentials() {
		return this.userDetails.getPassword();
	}
}
